package com.bub.pay.core.entity.vo.user;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.bub.pay.framework.common.base.BaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

@Data
@EqualsAndHashCode(callSuper = true)
public class LoginVo extends BaseVo {

    @NotBlank(message = "账号不能为空")
    private String loginName;

    @NotBlank(message = "密码不能为空")
    @JSONField(serialize = false)
    private String password;

    private int userType;

    @JSONField(serialize = false)
    private String googleCode;

    /**
     * 是否限制登录IP
     */
    private boolean limitIP = true;

    public String toString() {
        return JSON.toJSONString(this);
    }

}
